package com.kzy.demoadmin.web.mapper;


import com.kzy.demoadmin.web.entity.Audit;
import com.kzy.demoadmin.web.entity.BookPageQuery;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AuditMapper {
    /**
     * 根据id查询审批
     * @param integer
     * @return
     */
    @Select("select * from audit where id = #{id}")
    Audit findById(@Param("id") Integer integer);

    /**
     * 分页查询
     * @param audit
     * @return
     */
    List<Audit> searchBy(Audit audit);

    /**
     * 删除审批
     * @param id
     * @return
     */
    @Delete("delete from Audit where id = #{id}")
    int deleteById(Integer id);

    /**
     * 新增审批
     * @param audit
     */
    void insert(Audit audit);

    /**
     * 修改审批
     * @param audit
     */
    void update(Audit audit);
}
